import React, { forwardRef } from 'react';
import { AxCardListBx } from '@/components/AxCardList';
import { AxStandardCardProps } from './data.d';
import { AxStandardLayout } from '../AxStandardLayout';

const StandardCard = (props: AxStandardCardProps, ref: any) => {
  return (
    <AxStandardLayout
      ref={ref}
      {...props}
      RenderComponent={(args: any) =>
        <>
          <AxCardListBx
            data={args.data.list}
            loading={args.loading}
            descRows={args.descRows}
            {...args.rest}
          />
        </>
      }
    >
    </AxStandardLayout>
  );
}

const AxStandardCard = forwardRef(StandardCard);

export { AxStandardCard };